<?php
namespace app\product\model;

use think\Model;

class ProjectProduct extends Model
{
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    // 自动写入时间戳
    protected $autoWriteTimestamp = true;
    public function hasProduct()
    {
        return $this->hasOne('Product', 'id', 'product_id');
    }
}
